from flask import Flask
from website.views.users import users
from website.views.devices import devices

def create_app():
    app = Flask(__name__)
    app.config.from_object('website.config.settings')
    app.secret_key = 'super secret key'
    app.register_blueprint(users, url_prefix='/user')
    app.register_blueprint(devices, url_prefix='/device')

    return app